﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Protogamez
{
    /// <summary>
    /// Interaction logic for option.xaml
    /// </summary>
    public partial class option : Window
    {
        public option()
        {
            InitializeComponent();
        }

        private void windows_option_Loaded(object sender, RoutedEventArgs e)
        {
            textbox_bakcuplocation.Text = Properties.Settings.Default.backuppath;
        }

        private void button_saveexit_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void button_backupchange_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new System.Windows.Forms.FolderBrowserDialog();
            System.Windows.Forms.DialogResult result = dialog.ShowDialog();

            Properties.Settings.Default.backuppath = dialog.SelectedPath;
            Properties.Settings.Default.Save();

            textbox_bakcuplocation.Text = Properties.Settings.Default.backuppath;
        }
    }
}
